#ifndef __p_zikzak__
#define __p_zikzak__
if(token.Matches(_("p_zikzak"))&&(T.GetCount()==5))
{
    IsNotExtFunc = false;
    uint  CN = uint(calc(T[0]));
    double r = calc(T[1]);
    double a = calc(T[2]);
    double z = calc(T[3]);
    double ap= calc(T[4]);

    if(C[CN].Size()==0){CODE << _("ERROR in p_zikzak");break;}  //If no path then exit...
    if(C[CN].Z.ME.size()==0){ERR << _("no chamfer Z image found in p_zikzak");break;}
    if(ap<=0){CODE << _("NO CUTTING ap zero or up?\n");break;}

    //Offset test
    int db=0;
    while(true)
    {
        a=a-ap;
        if(a<z)a=z;
        mChain BW = C[CN].Offset( GetToolOffset(a,&SIM.T[tNum],&C[CN].Z));

        if(db==0)db=1;
        else
        {
            db=0;
            BW.Flip();
        }
        CODE << BW.CTG(a,a);

        if(a<=z)break;
        if(a>=r)break;
    }

    CODE << wxString::Format(_("G0Z%1.3f\n"),r);
    continue;
}
#endif
